package com.zy.design.pattern.strategy;

import com.zy.design.pattern.strategy.sort.ISort;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zhaoyi
 * @date 2021/8/17 17:11
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Rule {

    private long start;
    private long end;
    private ISort sort;

    public boolean match(long size) {
        return size >= start && size < end;
    }


}
